<?php

class CoursesDetailsController extends GxController {

    public $layout = 'applicationpage';

    public function actionregisterstep4() {
        $model = new CoursesDetails;
        if (isset($_POST['CoursesDetails'])) {
            $model->setAttributes($_POST['CoursesDetails']);

            if ($model->save()) {
                if (Yii::app()->getRequest()->getIsAjaxRequest())
                    Yii::app()->end();
                else
                    $this->redirect(array('view', 'id' => $model->id));
            }
        }

        $this->render('_form', array('model' => $model));
    }

}
